package com.sky.exception;

import lombok.Data;

/**
 * @author LENOVO
 * @version 1.0
 * @date 2025/3/26 下午10:57
 */
@Data
public class AuthException extends RuntimeException{

    private String message;

    public AuthException(String message) {
        this.message = message;
    }

    public AuthException() {
        this.message = "用户权限不足";
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static void cast(String msg){
        throw new AuthException(msg);
    }

    public static void cast(){
        throw new AuthException("用户权限不足");
    }

}